Sets how strong a text effect plays, from 0 to 100 percent (100 is the effect as you made it, and what it is until you call this). The percent multiplies the strength of every track of that effect, on top of the track’s own way of moving, so a pulse still rises and falls as it was made, only less far; 0 shows nothing at all, the words are drawn plainly. Call it from any event, a Step event included: change the number a little each frame (tween_to does it for you) and an effect fades in from nothing, reaches full strength and settles down to no effect at all.
Works differently on Game Boy - The Game Boy multiplies the strength of the effect's Letters by the percent, as the Game Boy Advance does (it has no Tint on text).
Works differently on Game Boy Color - Text effects play in a plainer form: letters appear one by one, colors change as made, text shakes or ripples sideways; letters never turn or grow.
Works differently on Sega Genesis - The Sega Genesis plays a text effect its own way. This version plays the Tint track (the words' color mixed toward the effect's color, with the effect's timing) and the Wave and the Shake of the Letters track (each letter its own sprite). It does not play the other Letters looks yet and cannot turn, resize, block or fade words, so the other Letters looks and the Stretch, Blocks, See-through, Scale, Rotate and Flip tracks do not show (the build says which effect has one); use Make a sprite from this effect for those.
On other consoles this differs: see Side by side and How the consoles differ.
text_effect_strength(effect, percent)| Name | Type |
|---|---|
effect | overlay |
percent | int |
Nothing.
Sets how strong a text effect plays, from 0 to 100 percent. 100 is the effect as you made it, and what it is until you call this. The percent multiplies the strength of every track of that effect, on top of the track's own way of moving: a pulse still rises and falls as you made it, only less far. 0 shows nothing at all: the words are drawn plainly.
Call it from any event, a Step event included, and change the number as the game goes. That is how an effect fades in from nothing, reaches full strength and then settles down to no effect at all: tween a number from 0 to 100 and back to 0, and hand it to text_effect_strength every frame.
age += 1;
if (age == 1) { tween_to(fade, 100, 60, EASE_QUAD_OUT); }
if (age == 150) { tween_to(fade, 0, 60, EASE_QUAD_IN); }
text_effect_strength(te_doc_flash, int_round(fade));Over the first second the effect grows from nothing to full strength. After two and a half seconds it fades away again, and the words are plain once more. fade is a number the object keeps (give it a value in its Create event: fade = 0.0;), and tween_to moves it by itself.
text_effect_start every frame (as a Draw event does) does not reset it. You can set it before the effect has ever played. text_effect_strength(effect, 100) puts it back.percent is kept between 0 and 100; a bigger or smaller number is cut to that.text_effect_speed does that). To read the number back, use text_effect_strength_get. A sprite effect has sprite_effect_strength.Up to 8 text effects can have a strength that is not 100 at one time (put the ones you are done with back to 100); a development build stops with a message that says so if there are more. A game that never calls text_effect_strength has none of this in its cartridge.
The number belongs to the effect and is kept until you change it (calling text_effect_start every frame, as a Draw event does, does not reset it); 100 forgets it. It can be set before the effect is first played, and for up to 8 effects at a time that are not at 100. Tint, Letters, Blocks and See-through all follow it. A Scale or Rotate track goes that part of the way from no change to what the curve says, so 50 percent of a turn of 90 degrees is 45. A game that never calls it has none of this in its cartridge.